package com.grass.p019lv.databinding;

import android.graphics.drawable.Drawable;
import android.support.p007v4.media.session.PlaybackStateCompat;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.TextViewBindingAdapter;
import androidx.databinding.adapters.ViewBindingAdapter;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.bean.VideoBean;
import com.androidx.p013lv.base.utils.UiUtils;
import com.androidx.p013lv.base.view.CircleImageView;
import com.grass.p019lv.activity.VideoPlayActivity;
import com.grass.p019lv.generated.callback.OnClickListener;
import com.zhy.view.flowlayout.TagFlowLayout;

/* renamed from: com.grass.lv.databinding.VideoPlayerDetailsLayoutBindingImpl */
public class VideoPlayerDetailsLayoutBindingImpl extends VideoPlayerDetailsLayoutBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds;
    private final View.OnClickListener mCallback100;
    private final View.OnClickListener mCallback101;
    private final View.OnClickListener mCallback97;
    private final View.OnClickListener mCallback98;
    private final View.OnClickListener mCallback99;
    private long mDirtyFlags;
    private final RelativeLayout mboundView0;
    private final LinearLayout mboundView10;
    private final ImageView mboundView11;
    private final TextView mboundView12;
    private final LinearLayout mboundView13;
    private final TextView mboundView14;
    private final LinearLayout mboundView15;
    private final ImageView mboundView2;
    private final ImageView mboundView3;
    private final TextView mboundView4;
    private final TextView mboundView5;
    private final TextView mboundView6;
    private final LinearLayout mboundView7;
    private final ImageView mboundView8;
    private final TextView mboundView9;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray();
        sViewsWithIds = sparseIntArray;
        sparseIntArray.put(R.id.rl_video_title, 16);
        sViewsWithIds.put(R.id.ll_tag, 17);
        sViewsWithIds.put(R.id.flow_type, 18);
        sViewsWithIds.put(R.id.ll_video_score_watches, 19);
        sViewsWithIds.put(R.id.iv_download, 20);
        sViewsWithIds.put(R.id.tv_download, 21);
        sViewsWithIds.put(R.id.tv_collect_state, 22);
    }

    public VideoPlayerDetailsLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 23, sIncludes, sViewsWithIds));
    }

    private VideoPlayerDetailsLayoutBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 1, (TagFlowLayout) objArr[18], (ImageView) objArr[20], (LinearLayout) objArr[17], (LinearLayout) objArr[19], (RelativeLayout) objArr[16], (TextView) objArr[22], (TextView) objArr[21], (CircleImageView) objArr[1]);
        this.mDirtyFlags = -1;
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.mboundView0 = relativeLayout;
        relativeLayout.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[10];
        this.mboundView10 = linearLayout;
        linearLayout.setTag(null);
        ImageView imageView = (ImageView) objArr[11];
        this.mboundView11 = imageView;
        imageView.setTag(null);
        TextView textView = (TextView) objArr[12];
        this.mboundView12 = textView;
        textView.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[13];
        this.mboundView13 = linearLayout2;
        linearLayout2.setTag(null);
        TextView textView2 = (TextView) objArr[14];
        this.mboundView14 = textView2;
        textView2.setTag(null);
        LinearLayout linearLayout3 = (LinearLayout) objArr[15];
        this.mboundView15 = linearLayout3;
        linearLayout3.setTag(null);
        ImageView imageView2 = (ImageView) objArr[2];
        this.mboundView2 = imageView2;
        imageView2.setTag(null);
        ImageView imageView3 = (ImageView) objArr[3];
        this.mboundView3 = imageView3;
        imageView3.setTag(null);
        TextView textView3 = (TextView) objArr[4];
        this.mboundView4 = textView3;
        textView3.setTag(null);
        TextView textView4 = (TextView) objArr[5];
        this.mboundView5 = textView4;
        textView4.setTag(null);
        TextView textView5 = (TextView) objArr[6];
        this.mboundView6 = textView5;
        textView5.setTag(null);
        LinearLayout linearLayout4 = (LinearLayout) objArr[7];
        this.mboundView7 = linearLayout4;
        linearLayout4.setTag(null);
        ImageView imageView4 = (ImageView) objArr[8];
        this.mboundView8 = imageView4;
        imageView4.setTag(null);
        TextView textView6 = (TextView) objArr[9];
        this.mboundView9 = textView6;
        textView6.setTag(null);
        this.videoImg.setTag(null);
        setRootTag(view);
        this.mCallback100 = new OnClickListener(this, 4);
        this.mCallback99 = new OnClickListener(this, 3);
        this.mCallback101 = new OnClickListener(this, 5);
        this.mCallback98 = new OnClickListener(this, 2);
        this.mCallback97 = new OnClickListener(this, 1);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 2048;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (196 == i) {
            setVideoBean((VideoBean) obj);
        } else if (34 != i) {
            return false;
        } else {
            setClick((VideoPlayActivity.OnClick) obj);
        }
        return true;
    }

    @Override // com.grass.p019lv.databinding.VideoPlayerDetailsLayoutBinding
    public void setVideoBean(VideoBean videoBean) {
        updateRegistration(0, videoBean);
        this.mVideoBean = videoBean;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(196);
        super.requestRebind();
    }

    @Override // com.grass.p019lv.databinding.VideoPlayerDetailsLayoutBinding
    public void setClick(VideoPlayActivity.OnClick onClick) {
        this.mClick = onClick;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(34);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        if (i != 0) {
            return false;
        }
        return onChangeVideoBean((VideoBean) obj, i2);
    }

    private boolean onChangeVideoBean(VideoBean videoBean, int i) {
        if (i == 0) {
            synchronized (this) {
                this.mDirtyFlags |= 1;
            }
            return true;
        } else if (i == 199) {
            synchronized (this) {
                this.mDirtyFlags |= 4;
            }
            return true;
        } else if (i == 176) {
            synchronized (this) {
                this.mDirtyFlags |= 8;
            }
            return true;
        } else if (i == 161) {
            synchronized (this) {
                this.mDirtyFlags |= 16;
            }
            return true;
        } else if (i == 64) {
            synchronized (this) {
                this.mDirtyFlags |= 32;
            }
            return true;
        } else if (i == 162) {
            synchronized (this) {
                this.mDirtyFlags |= 64;
            }
            return true;
        } else if (i == 62) {
            synchronized (this) {
                this.mDirtyFlags |= 128;
            }
            return true;
        } else if (i == 105) {
            synchronized (this) {
                this.mDirtyFlags |= 256;
            }
            return true;
        } else if (i == 61) {
            synchronized (this) {
                this.mDirtyFlags |= 512;
            }
            return true;
        } else if (i != 63) {
            return false;
        } else {
            synchronized (this) {
                this.mDirtyFlags |= 1024;
            }
            return true;
        }
    }

    /* access modifiers changed from: protected */
    /* JADX WARNING: Removed duplicated region for block: B:41:0x007d  */
    /* JADX WARNING: Removed duplicated region for block: B:42:0x007f  */
    /* JADX WARNING: Removed duplicated region for block: B:45:0x0086  */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        int i;
        String str;
        String str2;
        Drawable drawable;
        int i2;
        boolean z;
        String str3;
        String str4;
        String str5;
        Drawable drawable2;
        int i3;
        int i4;
        VideoBean videoBean;
        String str6;
        String str7;
        int i5;
        int i6;
        boolean z2;
        boolean z3;
        int i7;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        VideoBean videoBean2 = this.mVideoBean;
        VideoPlayActivity.OnClick onClick = this.mClick;
        int i8 = 8;
        if ((4095 & j) != 0) {
            if ((j & 2061) != 0) {
                if (videoBean2 != null) {
                    i7 = videoBean2.getVideoType();
                } else {
                    i7 = 0;
                }
                long j2 = j & 2053;
                if (j2 != 0) {
                    boolean z4 = i7 == 2;
                    boolean z5 = i7 == 1;
                    if (j2 != 0) {
                        j |= z4 ? PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE_ENABLED : PlaybackStateCompat.ACTION_SET_REPEAT_MODE;
                    }
                    if ((j & 2053) != 0) {
                        j |= z5 ? 8192 : 4096;
                    }
                    i2 = z4 ? 0 : 8;
                    if (!z5) {
                        i6 = 8;
                        z = i7 == 0;
                        if ((j & 2061) != 0) {
                            j = z ? j | 131072 : j | 65536;
                        }
                    }
                } else {
                    i2 = 0;
                }
                i6 = 0;
                if (i7 == 0) {
                }
                if ((j & 2061) != 0) {
                }
            } else {
                z = false;
                i2 = 0;
                i6 = 0;
            }
            if ((j & 2081) != 0) {
                str4 = UiUtils.num2str(videoBean2 != null ? videoBean2.getFakeWatchNum() : 0) + "次播放";
            } else {
                str4 = null;
            }
            if ((j & 2177) != 0) {
                str3 = UiUtils.num2str(videoBean2 != null ? videoBean2.getFakeScoreNum() : 0);
            } else {
                str3 = null;
            }
            long j3 = j & 2113;
            if (j3 != 0) {
                if (videoBean2 != null) {
                    z3 = videoBean2.isScored();
                } else {
                    z3 = false;
                }
                if (j3 != 0) {
                    j |= z3 ? 32768 : 16384;
                }
                drawable = getDrawableFromResource(this.mboundView8, z3 ? R.drawable.ic_score_btn_video_red : R.drawable.ic_score_btn_video);
            } else {
                drawable = null;
            }
            if ((j & 2561) != 0) {
                str2 = UiUtils.num2str(videoBean2 != null ? videoBean2.getFakeLikes() : 0);
            } else {
                str2 = null;
            }
            long j4 = j & 2305;
            if (j4 != 0) {
                if (videoBean2 != null) {
                    z2 = videoBean2.isLike();
                } else {
                    z2 = false;
                }
                if (j4 != 0) {
                    j |= z2 ? 8388608 : 4194304;
                }
                drawable2 = z2 ? getDrawableFromResource(this.mboundView11, R.drawable.ic_collect_btn_video_red) : getDrawableFromResource(this.mboundView11, R.drawable.ic_collect_btn_video);
            } else {
                drawable2 = null;
            }
            if ((j & 3073) != 0) {
                str5 = UiUtils.num2str(videoBean2 != null ? videoBean2.getFakeShareNum() : 0);
            } else {
                str5 = null;
            }
            if ((j & 2065) != 0) {
                str = String.valueOf((videoBean2 != null ? videoBean2.getScore() : 0.0d) + "分·");
                i = i6;
            } else {
                i = i6;
                str = null;
            }
        } else {
            drawable2 = null;
            str5 = null;
            str4 = null;
            str3 = null;
            z = false;
            i2 = 0;
            drawable = null;
            str2 = null;
            str = null;
            i = 0;
        }
        long j5 = j & 2051;
        if (j5 != 0) {
            if (onClick != null) {
                i5 = onClick.isHaveContent(videoBean2);
            } else {
                i5 = 0;
            }
            boolean z6 = i5 == 0;
            if (j5 != 0) {
                j |= z6 ? PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE : PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED;
            }
            if (!z6) {
                i8 = 0;
            }
            i3 = i8;
        } else {
            i3 = 0;
        }
        if ((j & 196608) != 0) {
            str6 = videoBean2 != null ? videoBean2.getTitle() : null;
            if ((j & 131072) != 0) {
                videoBean = videoBean2;
                StringBuilder sb = new StringBuilder();
                i4 = i3;
                sb.append("            ");
                sb.append(str6);
                str7 = String.valueOf(sb.toString());
            } else {
                videoBean = videoBean2;
                i4 = i3;
                str7 = null;
            }
        } else {
            videoBean = videoBean2;
            i4 = i3;
            str7 = null;
            str6 = null;
        }
        long j6 = j & 2061;
        if (j6 == 0) {
            str6 = null;
        } else if (z) {
            str6 = str7;
        }
        if ((2048 & j) != 0) {
            this.mboundView10.setOnClickListener(this.mCallback99);
            this.mboundView13.setOnClickListener(this.mCallback100);
            this.mboundView15.setOnClickListener(this.mCallback101);
            this.mboundView7.setOnClickListener(this.mCallback98);
            this.videoImg.setOnClickListener(this.mCallback97);
        }
        if ((j & 2305) != 0) {
            ViewBindingAdapter.setBackground(this.mboundView11, drawable2);
        }
        if ((2561 & j) != 0) {
            TextViewBindingAdapter.setText(this.mboundView12, str2);
        }
        if ((3073 & j) != 0) {
            TextViewBindingAdapter.setText(this.mboundView14, str5);
        }
        if ((j & 2053) != 0) {
            this.mboundView2.setVisibility(i2);
            this.mboundView3.setVisibility(i);
        }
        if (j6 != 0) {
            TextViewBindingAdapter.setText(this.mboundView4, str6);
        }
        if ((2065 & j) != 0) {
            TextViewBindingAdapter.setText(this.mboundView5, str);
        }
        if ((j & 2081) != 0) {
            TextViewBindingAdapter.setText(this.mboundView6, str4);
        }
        if ((j & 2113) != 0) {
            ViewBindingAdapter.setBackground(this.mboundView8, drawable);
        }
        if ((j & 2177) != 0) {
            TextViewBindingAdapter.setText(this.mboundView9, str3);
        }
        if ((2051 & j) != 0) {
            this.videoImg.setVisibility(i4);
        }
        if ((j & 2049) != 0) {
            VideoPlayActivity.loadContentHead(this.videoImg, videoBean);
        }
    }

    @Override // com.grass.p019lv.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        if (i == 1) {
            VideoPlayActivity.OnClick onClick = this.mClick;
            if (onClick != null) {
                z = true;
            }
            if (z) {
                onClick.relatedWorksMore();
            }
        } else if (i == 2) {
            VideoPlayActivity.OnClick onClick2 = this.mClick;
            if (onClick2 != null) {
                z = true;
            }
            if (z) {
                onClick2.scoreForVideo();
            }
        } else if (i == 3) {
            VideoPlayActivity.OnClick onClick3 = this.mClick;
            if (onClick3 != null) {
                z = true;
            }
            if (z) {
                onClick3.collectForVideo();
            }
        } else if (i == 4) {
            VideoPlayActivity.OnClick onClick4 = this.mClick;
            if (onClick4 != null) {
                z = true;
            }
            if (z) {
                onClick4.shareForVideo();
            }
        } else if (i == 5) {
            VideoPlayActivity.OnClick onClick5 = this.mClick;
            if (onClick5 != null) {
                z = true;
            }
            if (z) {
                onClick5.downLoadVideo();
            }
        }
    }
}
